<template>
    <!-- 用户中心-项目发布 -->
    <div class="container mb-40">
        <Breadcrumb :list="['用户中心']" />
        <div class="main">
            <div class="nav">
                <el-card class="box-card" body-style="padding:10px 0">
                    <div v-for="(item, index) in navArr" :key="index" class="text item" @click.native="clickNav(index)"
                        :class="index == dynamic ? 'active' : ''"><a>{{ item }}</a></div>
                </el-card>
            </div>
            <div class="detail">
                <div class="title">
                    <div class="a"></div>
                    <span>项目发布</span>
                    <el-button type="primary" class="btn">+&nbsp;我要发布</el-button>
                </div>
                <div class="content" v-for="i in 2">
                    <el-card class="box-card" shadow="never" body-style="padding:10px">
                        <img src="@/assets/images/floor_b.png" alt="">
                        <p class="top">
                            <router-link to="/center/projdetail">
                            [成果转化]&nbsp;项目标题文字描述内容</router-link></p>
                        <p class="describe">
                            文字描述内容文字描述内容文字描述内容文字描述内容文字描述内容文字描述内容文字描述文字描述内容文字描述内容文字描述内容文字描述内容文字描述内容文字描述内容文字描述内容文字描述文字描述内容</p>
                        <p class="date">2023-07-15</p>
                        <div class="bottom">
                            <div class="text">
                                承接单位：<span>5</span>家&nbsp;&nbsp;浏览量：<span>135</span>次
                            </div>
                            <div class="btns">
                                <el-button type="primary" size="small" class="iconfont">&#xe600;&nbsp;查看</el-button>
                                <el-button type="primary" size="small" class="iconfont">&#xe8ac;&nbsp;编辑</el-button>
                                <el-button type="danger" size="small" class="iconfont">&#xe74b;&nbsp;删除</el-button>
                            </div>
                        </div>
                    </el-card>
                </div>

            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import Breadcrumb from '@/components/Breadcrumb.vue';
import { ref } from 'vue';
const dynamic = ref(0)
const navArr = ref(["基本信息", "修改密码", "项目发布", "项目承接", "我的动态", "组织风采"])
const clickNav = (index:any) => {
    dynamic.value = index;
}
</script>

<style scoped lang="less">
@import "@/assets/style/common.less";
.main {
    overflow: hidden;

    .nav {
        float: left;

        .text {
            font-size: 18px;
            line-height: 60px;
        }

        .item {
            height: 60px;
            text-align: center;
            align-items: center;
        }

        .box-card {
            width: 196px;

            div.active{
                background-color:#009CF2 ;
            }
        }
    }

    .detail {
        width: 900px;
        height: 541px;
        float: right;
        background: #FFFFFF;
        padding: 0 40px;

        .title {
            padding: 40px 0 22px 0;
            position: relative;
            span {
                font-size: 24px;
                line-height: 30px;
            }
            .a {
                width: 6px;
                height: 24px;
                line-height: 48px;
                background: #009CF2;
                position: absolute;
                top: 45px;
                left: -12px;
            }
            .btn {
                float: right;
            }
        }

        .content {
            +div {
                padding-top: 12px;
            }

            .box-card {
                width: 900px;
                height: 164px;
                position: relative;

                img {
                    width: 150px;
                    height: 100px;
                    float: left;
                    padding-right: 20px;
                }
                .top {
                    font-size: 18px;
                    color: #222222;
                    line-height: 40px;
                    font-weight: bold;
                }
                .describe {
                    font-size: 14px;
                    color: #666666;
                    line-height: 24px;
                    white-space: nowrap;
                    overflow: hidden;
                    text-overflow: ellipsis;

                }

                .date {
                    font-size: 14px;
                    color: #999999;
                    line-height: 40px;
                }

                .bottom {
                    font-size: 14px;
                    width: 100%;
                    color: #222222;
                    line-height: 40px;
                    display: flex;
                    font-weight: 500;
                    justify-content: space-between;
                    background-color: #EEEEEE;
                    position: absolute;
                    bottom: 0;
                    left: 0;

                    div {
                        padding: 0 10px;
                    }

                    span {
                        color: red;
                    }
                }
            }
        }
    }
}
</style>
